home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Imagine the Universe (9th Edition)
/
Imagine the Universe 9 - Disc 1.iso
/
pc
/
imagine
/
YBA
/
HTCas-size
/
javascript
/
parallax1.js
< prev
next >
Wrap
Text File
|
2003-01-12
|
551b
|
26 lines
size = "Blank";
function checkme() {
size = document.parallax.distance.value - 0;
if (!size) {size = "Blank";}
RightOnFile = './parallax1-correct.html';
TryAgainFile = './parallax1-close.html';
WayWrongFile = './parallax1-wrong.html';
low_wrong = 100;
low_good = 120;
hi_good = 140;
hi_wrong = 180;
if ((size != "Blank") && (size >= low_good) && (size <= hi_good)) {
location = RightOnFile;
}
else if ((size == "Blank") || ((size < low_wrong) || (size > hi_wrong))) {
location = WayWrongFile;
}
else {
location = TryAgainFile;
}
}